home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.19950929-19951130
/
000371_news@columbia.edu_Mon Nov 13 20:10:36 1995.msg
< prev
next >
Wrap
Internet Message Format
|
1995-12-25
|
4KB
Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA12900
(5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun>); Mon, 13 Nov 1995 15:10:57 -0500
Received: (from news@localhost) by apakabar.cc.columbia.edu (8.6.12/8.6.12) id PAA19745 for kermit.misc@watsun; Mon, 13 Nov 1995 15:10:48 -0500
Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: disable "disconnect" when exit from kermit
Date: 13 Nov 1995 20:10:36 GMT
Organization: Columbia University
Lines: 66
Message-Id: <4888ns$j8s@apakabar.cc.columbia.edu>
References: <DHu494.9p5@scisun.sci.ccny.cuny.edu>
Nntp-Posting-Host: watsun.cc.columbia.edu
Apparently-To: kermit.misc@watsun.cc.columbia.edu
In article <DHu494.9p5@scisun.sci.ccny.cuny.edu>,
Hua Deng <deng@scisun.sci.ccny.cuny.edu> wrote:
: I am trying to add a callback feature through a modem on a sgi
: (running irix5.3) and need a program which has the option not to
: disconnect the establish serial port connection when exit from the
: program.
:
: On a HP workstaion, the command "ct" has the following option which
: does the trick:
:
: -h Prevent ct from disconnecting ("hanging up") the
: current tty line. This option is necessary if the
: user is using a different tty line than the one
: used by ct to spawn the getty.
:
: Howerver, that command is not available on sgi and "cu" will disconnect
: the line when exit, so does "kermit" under default settings.
: Is there an option in kermit similar to the -h option for ct?
:
This is a specific instance of a Frequently Asked Question, namely
"How Can I Exit from C-Kermit without Hanging up?" This is just been added
to our faq:
http://www.columbia.edu/kermit/faq.html
ftp://kermit.columbia.edu/kermit/faq.txt
Here's the text:
Many people want to be able to make a dialout connection with UNIX
C-Kermit, but then use some other software on the connection that C-Kermit
made. They quickly find that when they exit from C-Kermit, that the
connection is gone before they can start the other application.
It is a fundamental property of UNIX that when a process exits, then every
file that was opened by that process is automatically closed by UNIX.
Closing a terminal device (such as a dialout tty device) hangs it up.
There is nothing the process can do about it.
However, many workarounds are possible. Here are just a few:
. Read about the REDIRECT command in the ckcker.upd file.
. Find out the file descriptor of the open device (it is given by
C-Kermit's \v(ttyfd) variable) and then run ("!") your other program
from the C-Kermit prompt, feeding it the file descriptor, e.g. through
shell redirection or a command line option (the method depends on the
other program, the capabilities of the shell, etc).
. After Kermit makes the connection, type "show comm" to find out the
filename of the lock file. Then suspend Kermit, then delete the lock
file, then start the other program and tell it to open the same tty
device.
(End quote)
However, if all you want to do is dial up another computer that will dial
you back, there are easier ways to do it -- just write a Kermit script
that makes the call, performs the dialog with the callback system, and
then hangs up, and then waits to be called back. The test version of
C-Kermit, 5A(192), which you can find on kermit.columbia.edu in the
kermit/test tree, has a new ANSWER command to make the second part easy.
Without it, however, it's still pretty easy -- after hanging up,
"output ats0=1\13" to the modem and then wait for CONNECT (assuming the
modem is Hayes compatible).
- Frank